import { Button, DatePicker, Form, Input, Select } from 'antd'
import React from 'react'
const { RangePicker } = DatePicker;
function SeachForm({ ss, cz }) {
    return (
        <div>
            <Form
                onFinish={(value) => {
                    value.rangepicker = [
                        value.rangepicker[0].format('YYYY-MM-DD'),
                        value.rangepicker[1].format('YYYY-MM-DD')
                    ]
                    ss(value)
                }
                }
                onReset={cz}
                style={
                    {
                        display: 'flex',
                        justifyContent: 'space-between'
                    }
                }
            >
                <Form.Item name='name' label='姓名'>
                    <Input></Input>
                </Form.Item>
                <Form.Item name='status' label='状态'>
                    <Select style={{ width: 100 }}>
                        <Select.Option value='1'>开</Select.Option>
                        <Select.Option value='0'>关</Select.Option>
                    </Select>
                </Form.Item>
                <Form.Item name='job' label='职位'>
                    <Select style={{ width: 100 }}>
                        <Select.Option value='总经理'>总经理</Select.Option>
                        <Select.Option value='销售助理'>销售助理</Select.Option>
                        <Select.Option value='销售员'>销售员</Select.Option>
                    </Select>
                </Form.Item>
                <Form.Item name="rangepicker" label="时间">
                    <RangePicker />
                </Form.Item>
                <Form.Item>
                    <Button htmlType='submit'>搜索</Button>
                    <Button htmlType='reset'>重置</Button>
                </Form.Item>
            </Form>
        </div>
    )
}

export default SeachForm
